#ifndef USERLOGINFORM_H
#define USERLOGINFORM_H

#include <QWidget>
#include "pageadmininfo.h"
#include "pageuserupdateinfo.h"
#include "pageuserinfo.h"
#include "pagedeviceinfo.h"
#include "pagealarmmgmt.h"
#include "pagedataanalysis.h"
#include "pagedatamonitor.h"
#include "pagedevicemgmt.h"
#include "pagelogmgmt.h"
#include "pageusermgmt.h"
#include <QButtonGroup>


namespace Ui {
class userLoginForm;
}

class userLoginForm : public QWidget
{
    Q_OBJECT

public:
    // 定义枚举来管理页面索引
    enum  PageIndex {
        PAGE_USER_INFO ,
        PAGE_DEVICE_INFO,
        PAGE_ALARM_MGMT,
        PAGE_DATA_MONITOR,
        PAGE_DATA_ANALYSIS,
        PAGE_USER_UPDATE_INFO,

    };

    explicit userLoginForm(Mainbar *mainbar, QWidget *parent = nullptr); // 添加 Mainbar 参数
    ~userLoginForm();

signals:
    void sendMessage(const QString &);
    int display(int);

public slots:
    void onDisplayChanged(int index);
    void onPageUserUpdateInfoMessage(const QString &);

private:
    Ui::userLoginForm *ui;
    pageUserInfo *m_pageUserInfo;
    pageUserUpdateInfo *m_pageUserUpdateInfo;
    pageDeviceInfo *m_pageDeviceInfo;
    pageAlarmMgmt *m_pageAlarmMgmt;
    pageDataMonitor *m_pageDataMonitor;
    pageDataAnalysis *m_pageDataAnalysis;
    QButtonGroup *m_buttonGroup;
};

#endif // USERLOGINFORM_H
